package createModel.BuilderModel.clientBuildPlayer;

public class ClientBuildTest {
    public static void main(String[] args) {
        // 使用建造者模式,为Product创建实例
        Product product = new WorkerBuilder()
                .buildPartA("A")
                .buildPartB("B")
                .buildPartC("C")
                .buildPartD("D").getProduct();

        System.out.println(product);

        // 如果没有指定构造函数，则使用默认值为Product创建实例
        Product product1 = new WorkerBuilder().getProduct();
        System.out.println(product1);

        StringBuilder stringBuilder = new StringBuilder("123");
        System.out.println(stringBuilder.toString());
    }
}
